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,EAAAA,EAAuB5C,QAAS,IAC9B,SAACP,EAAQ,CAEPlH,MAAOqK,EAAYvK,KACnBqH,SAAUkD,EAAYlD,UAFjB,wBAAwC,OAAhBkD,EAAY5K,YAjBtCP,EAASO,SA2B/BkK,IACC,SAACzC,EAAQ,CAAClH,MAAM,WAAWmH,SAAUuB,OAIxCU,IAAsB,SAAC/H,EAAAA,EAAY,S,kIC1OnC,SAAe2H,EAAesB,G,OAAftB,EAAc,sB,SAAdA,I,OAAAA,GAAf,iBAA8BsB,G,IAC7BC,E,iEAAW,O,EAAMC,EAAAA,EAAAA,IAAQ,cAAe,CAC5CF,QAAQ,UACHA,M,OA4BP,OA9BMC,EAAW,SA8BV,C,GAxBoBA,EAASV,MAAQ,IAAIhJ,KAAI,SAAC4J,GAAoB,yBACpEA,GAAG,CACNtD,WAAc,OAAHsD,QAAG,IAAHA,OAAAA,EAAAA,EAAKtD,WAAY,IAAIuD,QAC9B,SAACC,EAAqBC,GACpB,MAA4B,aAAhB,OAARA,QAAQ,IAARA,OAAAA,EAAAA,EAAUC,YAES,IAAnBD,EAASrE,OACTqE,EAASE,eACTF,EAASE,cAAcrD,OAAS,EAEhCkD,EAAQhM,MAAK,kBACRiM,GAAQ,CACXrE,OAAOwE,EAAAA,EAAAA,GAAcH,GACrBI,oBAAoB,KAEjBL,EAAQhM,KAAKiM,GACbD,GAEFA,IAET,kBA3B8B,wB,kCCX7B,SAAS/D,EAAsBlB,GACpC,IAAQoF,EAA6BpF,EAA7BoF,cAAeD,EAAcnF,EAAdmF,UAEvB,SAAIC,IAAiBA,EAAcrD,WAI/BoD,E,mGCTN,IAAMvE,EAAqB,SACzBC,EACAC,GAEA,SAAIA,GAAoBA,EAAmBD,M","sources":["webpack://_N_E/?fc64","webpack://_N_E/./src/components/Categories/CategoriesList/Category/styles.ts","webpack://_N_E/./src/components/Categories/CategoriesList/Category/index.tsx","webpack://_N_E/./src/components/Categories/CategoriesList/index.tsx","webpack://_N_E/./src/components/LabelText/index.ts","webpack://_N_E/./src/components/NavBottomBar/styles.ts","webpack://_N_E/./src/components/NavBottomBar/index.tsx","webpack://_N_E/./src/components/PageLoading/styles.ts","webpack://_N_E/./src/components/PageLoading/index.tsx","webpack://_N_E/./src/components/Products/ProductsList/Product/styles.ts","webpack://_N_E/./src/components/styles.ts","webpack://_N_E/./src/components/SortButton/styles.ts","webpack://_N_E/./src/components/SortButton/index.tsx","webpack://_N_E/./src/components/Products/ProductsList/Product/index.tsx","webpack://_N_E/./src/components/Products/ProductsList/index.tsx","webpack://_N_E/./src/pages/[storeTag]/index.tsx","webpack://_N_E/./src/services/categories.tsx","webpack://_N_E/./src/utils/checkIfProductIsCombo.ts","webpack://_N_E/./src/utils/isPromotionalPrice.ts"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/[storeTag]\",\n function () {\n return require(\"private-next-pages/[storeTag]/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/[storeTag]\"])\n });\n }\n ","import styled from 'styled-components';\n\nexport const Container = styled.li`\n margin-right: 25px;\n cursor: pointer;\n\n transition: transform 0.1s;\n\n max-width: 150px;\n\n &:hover {\n transform: scale(1.1);\n }\n\n > h1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n\n font-size: 13px;\n margin-top: 5px;\n color: ${({ theme }) => theme.colors.onBackground};\n }\n`;\n","import { FC } from 'react';\n\nimport Link from 'next/link';\n\nimport { routes } from '~/constants/routes';\n\nimport { useStore } from '~/hooks/store';\n\nimport { ImageContainer } from '~/components/ImageContainer';\n\nimport { Container } from './styles';\n\nimport { ICategory } from '~/interfaces/ICategory';\n\ninterface IProps {\n category: ICategory;\n}\n\nexport const Category: FC = ({ category }) => {\n const { store } = useStore();\n\n return (\n \n \n \n\n

{category.name}

\n
\n \n );\n};\n","import { FC } from 'react';\n\nimport { useTheme } from 'styled-components';\n\nimport { useMediaQuery } from '~/hooks/mediaQuery';\n\nimport { LabelText } from '~/components/LabelText';\n\nimport { List, ListContainer } from '../../styles';\n\nimport { ICategory } from '~/interfaces/ICategory';\n\nimport { Category } from './Category';\n\ninterface IProps {\n label?: string;\n categories: ICategory[];\n}\n\nexport const CategoriesList: FC = ({\n label = 'Categorias',\n categories,\n}) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(`(max-width: ${theme.mobileWidth})`);\n\n return (\n \n \n {label}\n \n\n \n {categories &&\n categories.map((category) => (\n \n ))}\n \n \n );\n};\n","import styled from 'styled-components';\n\nexport const LabelText = styled.span`\n display: inline-block;\n\n background: ${({ theme }) => theme.colors.primary};\n color: ${({ theme }) => theme.colors.onPrimary};\n\n padding: 0.55rem 2.5rem;\n border-radius: ${({ theme }) => theme.borderRadius.sm};\n\n line-height: 13px;\n\n font-size: 13px;\n font-weight: 500;\n letter-spacing: 0.6px;\n`;\n","import styled from 'styled-components';\n\nexport const Container = styled.div`\n position: fixed;\n bottom: 0;\n\n width: 100%;\n background: ${({ theme }) => theme.colors.secondBackground};\n\n border-radius: 5px 5px 0 0;\n\n box-shadow: 0 -3px 3px rgba(0, 0, 0, 0.1);\n\n .bottom-nav-buttons {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n button {\n position: relative;\n width: 55px;\n\n padding: 10px 0;\n\n svg {\n width: 30px;\n height: 30px;\n\n color: ${({ theme }) => theme.colors.onBackground};\n }\n\n .line {\n position: absolute;\n bottom: 0;\n\n height: 6px;\n width: 100%;\n\n background: ${({ theme }) => theme.colors.secondary};\n }\n\n .cart-quantity {\n display: flex;\n align-items: center;\n justify-content: center;\n\n position: absolute;\n top: 7px;\n right: 2px;\n\n background: ${({ theme }) => theme.colors.secondary};\n width: 20px;\n height: 20px;\n border-radius: 100%;\n\n font-size: 11.5px;\n font-weight: 700;\n color: ${({ theme }) => theme.colors.onSecondary};\n }\n }\n }\n`;\n","import { FC } from 'react';\n\nimport { FiShoppingCart } from 'react-icons/fi';\nimport { BiHomeAlt } from 'react-icons/bi';\n\nimport { useToast } from '@chakra-ui/react';\n\nimport { useStore } from '~/hooks/store';\nimport { useDrawer } from '~/hooks/drawer';\nimport { useCart } from '~/hooks/cart';\n\nimport { Container } from './styles';\n\nimport { ProfileItem } from '../ProfileItem';\nimport { CartDrawer } from '../Drawers/CartDrawer';\n\nexport const NavBottomBar: FC = () => {\n const toast = useToast({\n isClosable: true,\n position: 'top-right',\n status: 'warning',\n });\n const { openDrawer } = useDrawer();\n const { cartTotals } = useCart();\n const { isOpen } = useStore();\n\n function openCart(): void {\n if (!isOpen) {\n toast({\n title: 'Ops,',\n description: 'A loja está fechada!',\n });\n\n return;\n }\n\n openDrawer('Resumo do pedido', );\n }\n\n return (\n \n
\n \n\n \n\n \n
\n
\n );\n};\n","import styled, { keyframes } from 'styled-components';\n\nconst spin = keyframes`\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n`;\n\nexport const Container = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n\n z-index: 9999;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n\n width: 100%;\n height: 100%;\n padding: 7% 0;\n\n background: ${({ theme }) => theme.colors.background};\n\n footer {\n display: flex;\n flex-direction: column;\n align-items: center;\n\n > div {\n display: flex;\n flex-direction: column;\n align-items: center;\n\n margin-bottom: 50%;\n\n .loader {\n height: 45px;\n width: 45px;\n\n border-radius: 50%;\n border-width: 5px;\n border-style: solid;\n border-color: ${({ theme }) => theme.colors.background};\n border-top-color: ${({ theme }) => theme.colors.onBackground};\n border-right-color: ${({ theme }) => theme.colors.onBackground};\n\n animation: ${spin} 0.6s linear infinite;\n }\n\n p {\n font-size: 18px;\n font-weight: 600;\n color: ${({ theme }) => theme.colors.onBackground};\n\n margin-top: 15%;\n }\n }\n }\n`;\n","import { FC } from 'react';\n\nimport { Container } from './styles';\n\nimport { Image } from '../Image';\n\ninterface IProps {\n text: string;\n}\n\nexport const PageLoading: FC = ({ text }) => {\n return (\n \n
\n
\n
\n

{text}

\n
\n\n \n
\n
\n );\n};\n","import styled, { css } from 'styled-components';\n\nimport { SizeEnum } from '~/enums/SizeEnum';\n\ninterface IContainerProps {\n size: SizeEnum;\n fillAllSpace?: boolean;\n}\n\nexport const Container = styled.li`\n margin-right: 25px;\n\n transition: transform 0.2s;\n cursor: pointer;\n\n &:hover {\n transform: scale(1.1);\n }\n\n h1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n\n margin-top: 5px;\n margin-bottom: 1px;\n color: ${({ theme }) => theme.colors.onBackground};\n }\n\n .promotional-price {\n display: flex;\n flex-direction: column;\n\n > .price {\n font-size: 12px;\n line-height: 12px;\n\n b {\n font-size: 14px;\n }\n }\n }\n\n .price {\n font-weight: 700;\n color: #707070;\n }\n\n max-width: ${(props) =>\n props.size === 'sm'\n ? '80px'\n : props.size === 'md'\n ? '150px'\n : props.size === 'lg'\n ? '210px'\n : props.size === 'xl'\n ? '320px'\n : ''};\n\n ${(props) =>\n props.size === 'lg'\n ? css`\n .stars {\n svg {\n width: 16px;\n height: 16px;\n }\n }\n\n h1 {\n font-size: 14.5px;\n }\n\n .price {\n font-size: 14px;\n }\n `\n : css`\n .stars {\n svg {\n width: 14px;\n height: 14px;\n }\n }\n\n h1 {\n font-size: 13px;\n }\n\n .price {\n font-size: 13px;\n }\n `}\n\n ${({ fillAllSpace }) =>\n fillAllSpace &&\n css`\n display: flex;\n\n max-width: 100%;\n margin-right: 0;\n\n cursor: normal;\n\n transition: all 0.3s;\n\n &:hover {\n transform: scale(1);\n opacity: 0.7;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n width: 100%;\n\n margin-left: 20px;\n\n h1 {\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n p {\n margin: 5px 0;\n }\n\n button {\n margin-top: auto;\n }\n }\n `}\n`;\n\nexport const OldPrice = styled.span`\n font-weight: 500;\n color: #707070;\n font-size: 11px !important;\n margin-right: 5px;\n\n b {\n text-decoration: line-through;\n font-weight: 500;\n }\n`;\n","import styled, { css } from 'styled-components';\n\nimport { StoreThemeEnum } from '~/enums/StoreThemeEnum';\n\ninterface IListContainerProps {\n verticalProducts?: boolean;\n}\n\ninterface IListProps {\n paddingBottom?: number;\n verticalProducts?: boolean;\n}\n\ninterface IDescriptionProps {\n storeTheme: StoreThemeEnum;\n}\n\nexport const ListContainer = styled.div`\n margin-bottom: 22px;\n\n ${({ verticalProducts }) =>\n verticalProducts &&\n css`\n margin: ${({ theme }) => `0 ${theme.spacing}`};\n margin-bottom: ${({ theme }) => theme.spacing};\n\n @media (max-width: ${({ theme }) => theme.mobileWidth}) {\n margin: ${({ theme }) => `0 ${theme.mobileSpacing}`};\n margin-bottom: ${({ theme }) => theme.mobileSpacing};\n }\n `}\n`;\n\nexport const List = styled.ul`\n display: flex;\n flex-direction: row;\n\n overflow: auto;\n margin-left: ${({ theme }) => theme.spacing};\n margin-right: 20px;\n padding-bottom: ${(props) =>\n props.paddingBottom ? `${props.paddingBottom}px` : '18px'};\n padding-top: 18px;\n\n ${({ verticalProducts }) =>\n verticalProducts &&\n css`\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(400px, auto));\n grid-gap: 25px;\n\n margin-left: 0;\n\n overflow: hidden;\n padding: 0;\n\n @media (max-width: 700px) {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n `}\n\n @media (max-width: ${({ theme }) => theme.maxWidth}) {\n margin-right: 0;\n }\n\n @media (max-width: 500px) {\n margin-left: ${({ theme, verticalProducts }) =>\n !verticalProducts && theme.mobileSpacing};\n }\n`;\n\nexport const Description = styled.p`\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n\n font-size: 12px;\n color: ${({ theme }) => theme.colors.onBackground};\n word-break: break-word;\n`;\n","import styled from 'styled-components';\nimport { MenuButton, MenuItemOption, MenuList } from '@chakra-ui/react';\n\nexport const StyledMenuButton = styled(MenuButton)`\n position: sticky;\n top: ${({ theme }) => `calc(${theme.spacing} + 20px)`};\n padding-right: ${({ theme }) => theme.spacing};\n\n display: flex !important;\n margin-left: auto;\n margin-bottom: 20px;\n\n z-index: 10;\n\n span {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n background: ${({ theme }) => theme.colors.secondBackground};\n height: 40px;\n padding: 0 10px;\n border-radius: ${({ theme }) => theme.borderRadius.sm};\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);\n background: ${({ theme }) => theme.colors.primary};\n\n transition: opacity 0.3s;\n }\n\n @media (max-width: ${({ theme }) => theme.mobileWidth}) {\n top: ${({ theme }) => theme.mobileSpacing};\n padding-right: ${({ theme }) => theme.mobileSpacing};\n\n span {\n margin-right: 0;\n }\n }\n\n &:hover {\n opacity: 0.9;\n }\n\n p {\n font-size: 13px;\n font-weight: 600;\n letter-spacing: 0.3px;\n color: ${({ theme }) => theme.colors.onPrimary};\n\n margin-right: 3px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n svg {\n font-size: 15px;\n color: ${({ theme }) => theme.colors.onPrimary};\n }\n`;\n\nexport const StyledMenuList = styled(MenuList)`\n display: flex;\n flex-direction: column;\n\n box-shadow: 1px 5px 20px rgba(0, 0, 0, 0.2) !important;\n margin-right: ${({ theme }) => `calc(${theme.spacing} / 2)`};\n\n padding: 0 !important;\n\n strong {\n background: ${({ theme }) => theme.colors.secondBackground};\n\n font-size: 13px;\n color: ${({ theme }) => theme.colors.onBackground};\n font-weight: 600;\n\n padding: 10px 15px;\n border-bottom: ${({ theme }) => `1px solid ${theme.colors.onBackground}`};\n }\n\n @media (max-width: ${({ theme }) => theme.mobileWidth}) {\n margin-right: ${({ theme }) => `calc(${theme.mobileSpacing} / 2)`};\n }\n`;\n\nexport const StyledMenuItemOption = styled(MenuItemOption)`\n padding: 0 !important;\n margin: 0 !important;\n\n span:first-child {\n display: none;\n }\n\n > span {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n background: ${({ theme }) => theme.colors.secondBackground};\n padding: 20px 15px;\n border-bottom: ${({ theme }) => `1px solid ${theme.colors.onBackground}`};\n\n &:last-child {\n border-bottom: none;\n }\n\n transition: opacity 0.3s;\n\n &:hover {\n opacity: 0.8;\n }\n\n > div {\n &:first-child {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n color: ${({ theme }) => theme.colors.onBackground};\n font-size: 19px;\n }\n\n span {\n color: ${({ theme }) => theme.colors.onBackground};\n font-size: 14px;\n\n margin-left: 15px;\n }\n }\n\n &:last-child {\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 20px;\n height: 20px;\n border: ${({ theme }) => `2px solid ${theme.colors.onBackground}`};\n border-radius: ${({ theme }) => theme.borderRadius.xlg};\n\n margin-left: 20px;\n\n svg {\n color: ${({ theme }) => theme.colors.secondBackground};\n font-size: 12px;\n }\n }\n\n &.selected {\n background: ${({ theme }) => theme.colors.onBackground};\n }\n }\n }\n`;\n","import { IoChevronDown } from 'react-icons/io5';\nimport {\n FaCheck,\n FaSortAlphaDown,\n FaSortAlphaDownAlt,\n FaSortAmountDown,\n FaSortAmountDownAlt,\n} from 'react-icons/fa';\n\nimport { Menu, MenuOptionGroup } from '@chakra-ui/react';\n\nimport { SortTypeEnum, useSortProducts } from '~/hooks/sortProducts';\n\nimport {\n StyledMenuButton,\n StyledMenuList,\n StyledMenuItemOption,\n} from './styles';\n\nconst SortButton: React.FC = () => {\n const { sortProducts, selectedSort } = useSortProducts();\n\n return (\n \n \n

Ordenar

\n {selectedSort ?

(1)

: }\n
\n\n \n Ordenar por:\n\n \n sortProducts(SortTypeEnum.bySmallerPrice)}\n >\n
\n \n Menor preço\n
\n\n \n \n \n \n\n sortProducts(SortTypeEnum.byBiggerPrice)}\n >\n
\n \n Maior preço\n
\n\n \n \n \n \n\n sortProducts(SortTypeEnum.byLettersAZ)}\n >\n
\n \n Ordem alfabética (A-Z)\n
\n\n \n \n \n \n\n sortProducts(SortTypeEnum.byLettersZA)}\n >\n
\n \n Ordem alfabética (Z-A)\n
\n\n \n \n \n \n
\n
\n
\n );\n};\n\nexport default SortButton;\n","import { FC, useCallback } from 'react';\n\nimport { useRouter } from 'next/router';\n\nimport useMedia from 'use-media';\nimport { useTheme } from 'styled-components';\n\nimport { routes } from '~/constants/routes';\n\nimport { useStore } from '~/hooks/store';\nimport { useLayouts } from '~/hooks/layouts';\nimport { useCart } from '~/hooks/cart';\n\nimport { Description } from '~/components/styles';\nimport { ImageContainer } from '~/components/ImageContainer';\nimport { Button } from '~/components/Button';\nimport { Badge } from '~/components/Badge';\n\nimport { isPromotionalPrice } from '~/utils/isPromotionalPrice';\nimport { formatCurrency } from '~/utils/formatCurrency';\n\nimport { SizeEnum } from '~/enums/SizeEnum';\n\nimport { IProduct } from '~/interfaces/IProduct';\nimport { checkIfProductIsCombo } from '~/utils/checkIfProductIsCombo';\nimport { getComboMinPrice } from '~/utils/getComboMinPrice';\nimport { Container, OldPrice } from './styles';\n\ninterface IProps {\n product: IProduct;\n size?: SizeEnum;\n fillAllSpace?: boolean;\n}\n\nexport const Product: FC = ({ product, fillAllSpace, size = 'md' }) => {\n const { push } = useRouter();\n const { editingProduct, setEditingProduct } = useCart();\n const { store } = useStore();\n const { secondLayoutId } = useLayouts();\n const theme = useTheme();\n const maxWidthMobile = useMedia({ maxWidth: theme.mobileWidth });\n\n const handleProductClick = useCallback(() => {\n if (editingProduct) setEditingProduct(null);\n\n push(routes.product(store?.tag, product._id));\n }, [editingProduct, product._id, push, setEditingProduct, store?.tag]);\n\n return (\n \n \n\n
\n
\n

{product.name}

\n\n {store.layout === secondLayoutId ? (\n <>\n {isPromotionalPrice(product.price, product.promotionalPrice) ? (\n <>\n
\n \n De {formatCurrency(product.price)} Por\n \n\n \n {formatCurrency(\n isPromotionalPrice(\n product.price,\n product.promotionalPrice\n )\n ? product.promotionalPrice\n : product.price\n )}\n \n
\n \n ) : (\n \n {checkIfProductIsCombo(product)\n ? `a partir de ${formatCurrency(getComboMinPrice(product))}`\n : formatCurrency(product.price)}\n \n )}\n\n {product.description && (\n \n {product.description}\n \n )}\n \n ) : isPromotionalPrice(product.price, product.promotionalPrice) ? (\n <>\n
\n \n De {formatCurrency(product.price)}\n \n\n \n Por {formatCurrency(product.promotionalPrice)}\n \n
\n \n ) : checkIfProductIsCombo(product) ? (\n {`a partir de ${formatCurrency(\n getComboMinPrice(product)\n )}`}\n ) : (\n {formatCurrency(product.price)}\n )}\n
\n\n {store.layout === secondLayoutId && (\n \n Adicionar\n \n )}\n
\n \n );\n};\n","import { FC } from 'react';\n\nimport { useTheme } from 'styled-components';\n\nimport { useStore } from '~/hooks/store';\nimport { useMediaQuery } from '~/hooks/mediaQuery';\nimport { useLayouts } from '~/hooks/layouts';\n\nimport { LabelText } from '~/components/LabelText';\nimport { Accordion } from '~/components/Accordion';\n\nimport { List, ListContainer } from '../../styles';\n\nimport { SizeEnum } from '~/enums/SizeEnum';\n\nimport { IProduct } from '~/interfaces/IProduct';\nimport { ICategory } from '~/interfaces/ICategory';\n\nimport { Product } from './Product';\n\ninterface IProps {\n products: IProduct[];\n productSize?: SizeEnum;\n label: string;\n subcategories?: ICategory[];\n}\n\nexport const Products: FC = ({\n products,\n productSize,\n label,\n subcategories,\n}) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(`(max-width: ${theme.mobileWidth})`);\n const { store } = useStore();\n const { secondLayoutId } = useLayouts();\n\n return (\n \n {store.layout === secondLayoutId ? (\n \n \n {products &&\n products.map(\n (product) =>\n product && (\n \n )\n )}\n \n\n {subcategories?.length > 0 && (\n
0 ? '20px' : '0px' }}>\n {subcategories.map((subCat) => (\n \n \n {subCat.products &&\n subCat.products.map(\n (product) =>\n product && (\n \n )\n )}\n \n \n ))}\n
\n )}\n
\n ) : (\n <>\n \n {label}\n \n\n \n {products &&\n products.map(\n (product) =>\n product && (\n \n )\n )}\n \n \n )}\n
\n );\n};\n","/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport { Fragment, useEffect, useState, useMemo } from 'react';\n\nimport { useRouter } from 'next/router';\nimport { GetStaticPaths, InferGetStaticPropsType, NextPage } from 'next';\n\nimport { useToast } from '@chakra-ui/react';\n\nimport { useStore } from '~/hooks/store';\nimport { useSortProducts } from '~/hooks/sortProducts';\nimport { useMediaQuery } from '~/hooks/mediaQuery';\nimport { useLayouts } from '~/hooks/layouts';\n\nimport SortButton from '~/components/SortButton';\nimport { Products } from '~/components/Products/ProductsList';\nimport { PageLoading } from '~/components/PageLoading';\nimport { NavBottomBar } from '~/components/NavBottomBar';\nimport { CategoriesList } from '~/components/Categories/CategoriesList';\n\nimport { withSSRStore } from '~/utils/withSSRStore';\n\nimport { checkStoreIsOpen } from '~/services/store';\nimport {\n loadBestSellingProducts,\n loadPromotionalProducts,\n loadProducts,\n} from '~/services/products';\nimport { loadCategories } from '~/services/categories';\nimport { env } from '~/constants/env';\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n return {\n fallback: true,\n paths: [],\n };\n};\n\nexport const getStaticProps = withSSRStore(async (_, store) => {\n const { data: promotionalProductsData } = await loadPromotionalProducts();\n\n const { data: bestSellingProductsData } = await loadBestSellingProducts();\n\n const { data: withoutCategoryProductsData } = await loadProducts({\n showWithoutCategories: true,\n });\n\n const isOpen = await checkStoreIsOpen();\n\n return {\n props: {\n promotionalProductsData: promotionalProductsData || [],\n bestSellingProductsData: bestSellingProductsData || [],\n withoutCategoryProductsData: withoutCategoryProductsData || [],\n store: store || null,\n isOpen: isOpen || null,\n },\n revalidate: Number(env.REVALIDATE_TIME),\n };\n});\n\nconst HomePage: NextPage> = ({\n promotionalProductsData,\n bestSellingProductsData,\n withoutCategoryProductsData,\n isOpen,\n}) => {\n const [loading, setLoading] = useState(true);\n const isSmallerThan550px = useMediaQuery('(max-width: 550px)');\n const { isFallback } = useRouter();\n const { store, setIsOpen } = useStore();\n const { secondLayoutId } = useLayouts();\n const {\n bestSellingProducts,\n setBestSellingProducts,\n categoriesWithSubcategories,\n setCategoriesWithSubcategories,\n withoutCategoryProducts,\n setWithoutCategoryProducts,\n promotionalProducts,\n setPromotionalProducts,\n } = useSortProducts();\n\n const toast = useToast({\n title: 'Ops, ocorreu um erro',\n status: 'error',\n isClosable: true,\n position: 'top-right',\n });\n\n useEffect(() => {\n (async () => {\n if (store?._id) {\n try {\n const categoriesWithSubcategoriesData = await loadCategories({\n showProducts: true,\n showSubcategories: true,\n storeId: store._id,\n });\n\n setCategoriesWithSubcategories(categoriesWithSubcategoriesData);\n } catch {\n toast({\n status: 'error',\n title: 'Ops',\n description:\n 'Houve um erro ao carregar as categorias e subcategorias, recarregue a página e tente novamente!',\n });\n } finally {\n setLoading(false);\n }\n }\n })();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [store]);\n\n const isSmallerThan650px = useMediaQuery('(max-width: 650px)');\n\n const showPromotionalProducts =\n store.showProductsWithPromotion &&\n promotionalProducts &&\n promotionalProducts.length > 0;\n\n const showBestSellingProducts =\n store?.showBestSellerProducts &&\n bestSellingProducts &&\n bestSellingProducts.length > 0;\n\n const showCategories =\n categoriesWithSubcategories &&\n categoriesWithSubcategories.length > 0 &&\n store.layout !== secondLayoutId;\n\n const showCategoryProducts =\n (!(\n promotionalProducts &&\n promotionalProducts.length > 0 &&\n store.showProductsWithPromotion &&\n bestSellingProducts &&\n bestSellingProducts?.length > 0 &&\n store?.showBestSellerProducts\n ) &&\n categoriesWithSubcategories) ||\n store.layout === secondLayoutId;\n\n const showWithoutCategoryProducts =\n withoutCategoryProducts && withoutCategoryProducts.length > 0;\n\n useEffect(() => {\n if (isOpen?.error) {\n toast({\n description:\n 'Ao tentar verificar se a loja está dentro do horário de funcionamento.',\n });\n }\n }, [isOpen?.error, toast]);\n\n useEffect(() => {\n if (typeof isOpen?.data === 'boolean') {\n setIsOpen(isOpen.data);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen?.data]);\n\n useEffect(() => {\n if (bestSellingProductsData) {\n setBestSellingProducts(bestSellingProductsData);\n }\n\n if (withoutCategoryProductsData) {\n setWithoutCategoryProducts(withoutCategoryProductsData);\n }\n\n if (promotionalProductsData) {\n setPromotionalProducts(promotionalProductsData);\n }\n }, [\n bestSellingProductsData,\n promotionalProductsData,\n setBestSellingProducts,\n setCategoriesWithSubcategories,\n setPromotionalProducts,\n setWithoutCategoryProducts,\n withoutCategoryProductsData,\n ]);\n\n const fallback = useMemo(() => isFallback || loading, [isFallback, loading]);\n if (fallback) return ;\n\n return (\n <>\n
\n \n\n {showPromotionalProducts && (\n \n )}\n\n {showBestSellingProducts && (\n \n )}\n\n {showCategories && (\n \n )}\n\n {showCategoryProducts &&\n categoriesWithSubcategories\n ?.sort((a, b) => a.order - b.order)\n ?.map((category) => {\n return (\n // @ts-ignore\n \n {((category.products && category.products.length > 0) ||\n (store.layout === secondLayoutId &&\n category?.subcategories?.length > 0)) && (\n \n )}\n\n {store.layout !== secondLayoutId &&\n category.subcategories?.map(\n (subcategory) =>\n subcategory?.products &&\n subcategory?.products?.length > 0 && (\n \n )\n )}\n \n );\n })}\n\n {showWithoutCategoryProducts && (\n \n )}\n
\n\n {isSmallerThan650px && }\n \n );\n};\n\nexport default HomePage;\n","import { minPriceCombo } from '~/utils/minPriceCombo';\n\nimport { IProduct } from '~/interfaces/IProduct';\nimport { ICategory } from '~/interfaces/ICategory';\n\nimport { api } from './api';\n\ninterface IParams {\n showProducts?: boolean;\n showSubcategories?: boolean;\n storeId?: string;\n}\n\nexport async function loadCategories(params?: IParams): Promise {\n const response = await api.get('/categories', {\n params: {\n ...params,\n },\n });\n\n const categoriesMapping = (response.data || []).map((cat: ICategory) => ({\n ...cat,\n products: (cat?.products || []).reduce(\n (newList: IProduct[], nextProd: IProduct) => {\n if (nextProd?.comboType !== 'carvery') {\n if (\n nextProd.price === 0 &&\n nextProd.comboJourneys &&\n nextProd.comboJourneys.length > 0\n ) {\n newList.push({\n ...nextProd,\n price: minPriceCombo(nextProd),\n isComboWithinValue: true,\n });\n } else newList.push(nextProd);\n return newList;\n }\n return newList;\n },\n []\n ),\n }));\n\n return categoriesMapping;\n}\n\nexport async function loadCategory(\n id: string,\n params: IParams\n): Promise {\n const response = await api.get(`/categories/${id}`, {\n params: {\n ...params,\n },\n });\n\n const productsFiltereds = (response?.data?.products || []).filter(\n (product: IProduct) => product?.comboType !== 'carvery'\n );\n\n const categoryMapping = {\n ...response.data,\n products: productsFiltereds.map((prod: IProduct) => {\n if (\n prod.price === 0 &&\n prod.comboJourneys &&\n prod.comboJourneys.length > 0\n ) {\n return {\n ...prod,\n price: minPriceCombo(prod),\n isComboWithinValue: true,\n };\n }\n return prod;\n }),\n };\n\n return categoryMapping;\n}\n","import { IProduct } from '~/interfaces/IProduct';\n\nexport function checkIfProductIsCombo(product: IProduct): boolean {\n const { comboJourneys, comboType } = product;\n\n if (comboJourneys && comboJourneys.length) {\n return true;\n }\n\n if (comboType) {\n return true;\n }\n\n return false;\n}\n","const isPromotionalPrice = (\n price: number,\n promotionalPrice: number\n): boolean => {\n if (promotionalPrice && promotionalPrice < price) return true;\n\n return false;\n};\n\nexport { isPromotionalPrice };\n"],"names":["window","__NEXT_P","push","Container","styled","theme","colors","onBackground","Category","category","useStore","store","Link","href","routes","tag","_id","ImageContainer","pictures","picture","h1","name","CategoriesList","label","categories","useTheme","isMobile","useMediaQuery","mobileWidth","ListContainer","LabelText","style","marginLeft","mobileSpacing","spacing","List","map","primary","onPrimary","borderRadius","sm","secondBackground","secondary","onSecondary","NavBottomBar","toast","useToast","isClosable","position","status","useDrawer","openDrawer","useCart","cartTotals","isOpen","div","className","button","type","BiHomeAlt","onClick","CartDrawer","title","description","quantity","span","FiShoppingCart","ProfileItem","atNavBottom","spin","keyframes","background","PageLoading","text","footer","p","Image","src","alt","width","height","props","size","css","fillAllSpace","OldPrice","verticalProducts","paddingBottom","maxWidth","Description","StyledMenuButton","MenuButton","StyledMenuList","MenuList","StyledMenuItemOption","MenuItemOption","xlg","useSortProducts","sortProducts","selectedSort","Menu","id","closeOnSelect","IoChevronDown","strong","MenuOptionGroup","SortTypeEnum","FaSortAmountDownAlt","FaCheck","FaSortAmountDown","FaSortAlphaDown","FaSortAlphaDownAlt","Product","product","useRouter","editingProduct","setEditingProduct","useLayouts","secondLayoutId","maxWidthMobile","useMedia","handleProductClick","useCallback","darkBorder","layout","isPromotionalPrice","price","promotionalPrice","b","formatCurrency","Badge","checkIfProductIsCombo","getComboMinPrice","storeTheme","Button","backgroundColor","textColor","Products","products","productSize","subcategories","Accordion","Math","random","length","marginTop","subCat","invertColors","promotionalProductsData","bestSellingProductsData","withoutCategoryProductsData","useState","loading","setLoading","isSmallerThan550px","isFallback","setIsOpen","bestSellingProducts","setBestSellingProducts","categoriesWithSubcategories","setCategoriesWithSubcategories","withoutCategoryProducts","setWithoutCategoryProducts","promotionalProducts","setPromotionalProducts","useEffect","categoriesWithSubcategoriesData","loadCategories","showProducts","showSubcategories","storeId","isSmallerThan650px","showPromotionalProducts","showProductsWithPromotion","showBestSellingProducts","showBestSellerProducts","showCategories","showCategoryProducts","showWithoutCategoryProducts","error","data","useMemo","padding","SortButton","sort","a","order","Fragment","subcategory","params","response","api","cat","reduce","newList","nextProd","comboType","comboJourneys","minPriceCombo","isComboWithinValue"],"sourceRoot":""}